<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>
    <h2>Hello World</h2>
    <h3>num:{{num}}</h3>
    <h3>num + 10:{{num + 10}}</h3>
    <h3>姓名1:{{person["name"]}}</h3>
    <h3>年龄1:{{person["age"]}}</h3>
    <h3>姓名2:{{name}}</h3>
    <h3>年龄2:{{age}}</h3>
    <!-- 变量设置 -->
    {% set sex = "男" %}
    <h3>性别:{{sex}}</h3>
    <!-- for -->
    <ul>
        {% for _i in _list %}
        <li>{{_i}}</li>
        {% end %}
    </ul>
    <ul>
        {% for _index,_element in enumerate(_list) %}
        <li>序号:{{_index}},元素:{{_element}}</li>
        {% end %}
    </ul>
    <!-- if -->
    <h2>if</h2>
    {% for _index,_element in enumerate(_list) %}
    {% if _element == 3 %}
    <li>输出的元素为3,序号:{{_index}},元素:{{_element}}</li>
    {% end %}
    {% end %}

</body>

</html>